package service.creditcard;

import dao.AlbumDAO;
import dao.CreditCardDAO;
import dao.RecordDuplicateException;
import entities.Customer;
import entities.Album;
import entities.CreditCard;


public class CreditCardServiceInMemory implements CreditCardService {

	public CreditCardServiceInMemory(){
		
	}
	
	public static CreditCardService newInstance(){
		return new CreditCardServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public CreditCard findCC(String creditCardNum){
		CreditCardDAO db = CreditCardDAO.getInstance();
		CreditCard result = null;
		result = db.findCC(creditCardNum);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addCC(CreditCard obj) throws RecordDuplicateException{
		CreditCardDAO db = CreditCardDAO.getInstance();	
		db.addCC(obj);
		return;
	}









}
